import request from '@/utils/request';

//商品
export const spuPage = (params: any) => {
    return request({
        url: '/app-api/product/spu/page',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获得商品 SPU 明细
export const spuGetDetail = (params: any) => {
    return request({
        url: '/app-api/product/spu/get-detail',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获得顶级商品分类列表
export const categoryTopList = (params: any) => {
    return request({
        url: '/app-api/product/category/top/list',
        method: 'POST',
        body: params,
        hideLoading: false,
    });
};
//获得一级商品分类列表
export const categoryFirstList = (params: any) => {
    return request({
        url: '/app-api/product/category/first/list',
        method: 'POST',
        body: params,
        hideLoading: false,
    });
};
//获得二级商品分类列表
export const categorySecondList = (params: any) => {
    return request({
        url: '/app-api/product/category/second/list',
        method: 'POST',
        body: params,
        hideLoading: false,
    });
};
//获得最近的 n 条商品评价
export const commentList = (params: any) => {
    return request({
        url: '/app-api/product/comment/list',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获获得商品评价分页
export const commentPage = (params: any) => {
    return request({
        url: '/app-api/product/comment/page',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获得店铺详情
export const storeDetail = (params: any) => {
    return request({
        url: '/app-api/system/store/detail',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获得秒杀时间段列表
export const seckillConfigList = (params: any) => {
    return request({
        url: '/app-api/promotion/seckill-config/list',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获得秒杀活动分页
export const seckillActivityPage = (params: any) => {
    return request({
        url: '/app-api/promotion/seckill-activity/page',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获得当前秒杀活动
export const seckillActivityGetNow = (params: any) => {
    return request({
        url: '/app-api/promotion/seckill-activity/get-now',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获得秒杀活动明细
export const seckillActivity = (params: any) => {
    return request({
        url: '/app-api/promotion/seckill-activity/get-detail',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获得拼团活动分页
export const combinationActivityPage = (params: any) => {
    return request({
        url: '/app-api/promotion/combination-activity/page',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获得拼团活动明细
export const combinationActivityGetDetail = (params: any) => {
    return request({
        url: '/app-api/promotion/combination-activity/get-detail',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获得最近 n 条拼团记录（团长发起的）
export const combinationRecordGetHeadList = (params: any) => {
    return request({
        url: '/app-api/promotion/combination-record/get-head-list',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获得砍价活动分页
export const bargainActivityPage = (params: any) => {
    return request({
        url: '/app-api/promotion/bargain-activity/page',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
//获得砍价活动详情
export const bargainActivityGetDetail = (params: any) => {
    return request({
        url: '/app-api/promotion/bargain-activity/get-detail',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};
export const getCount = (data : any) => {
	return request({
		url: '/app-api/order/cart/get-count',
		method: 'get',
		body: data,
		hideLoading: false,
	});
};

//创建砍价/app-api/promotion/bargain-record/create
export const bargaincreate = (data : any) => {
	return request({
		url: '/app-api/promotion/bargain-record/create',
		method: 'POST',
		body: data,
		hideLoading: false,
	});
};

//获取砍价列表/app-api/promotion/bargain-record/page
export const bargainpage = (data : any) => {
	return request({
		url: '/app-api/promotion/bargain-record/page',
		method: 'GET',
		body: data,
		hideLoading: false,
	});
};

//获得砍价助力列表/app-api/promotion/bargain-help/list

export const bargainlist= (data : any) => {
	return request({
		url: '/app-api/promotion/bargain-help/list',
		method: 'GET',
		body: data,
		hideLoading: false,
	});
};

//获取砍价明细/app-api/promotion/bargain-record/get-detail
export const bargaindetail= (data : any) => {
	return request({
		url: '/app-api/promotion/bargain-record/get-detail',
		method: 'GET',
		body: data,
		hideLoading: false,
	});
};

//获取砍价海报/app-api/promotion/bargain-record/poster
export const bargainposter= (data : any) => {
	return request({
		url: '/app-api/promotion/bargain-record/poster',
		method: 'GET',
		body: data,
		hideLoading: false,
	});
};
